<!DOCTYPE html>
<html>
<head>
    <title>创建新文章</title>
</head>
<body>
    <h1>{% if form.instance.pk %}Update{% else %}Create{% endif %} Blog Post</h1>
    <form method="post">
        {% csrf_token %}
        {{ form.as_p }}
        <button type="submit">Publish</button>
    </form>
    <a href="{% url 'post_list' %}">Cancel</a>
</body>
</html>
